Release 10.1A: OpenEdge Development:
Progress 4GL Reference
OS-COPY statement
Executes an operating system file copy command from within Progress.
Syntax
source-filenameThe name of the original file. If you specify a directory, OS-COPY generates an error.
VALUE (expression)An expression that returns the name of the original file.
Expressioncan contain constants, field names, and variable names.target-filenameThe name of the new file or directory. If you specify a directory, OS-COPY gives the target file the same name as the source file.
VALUE (expression)An expression that returns the name of the new file or directory.
Exampleexpressioncan contain constants, field names, and variable names.This procedure opens a dialog box that prompts the user to choose a file to copy. It then prompts for a name for the copy. Finally, the procedure uses the OS-COPY statement to copy the file.
Notes
- The filenames must conform to the naming conventions of the underlying operating system.
- If
target-filespecifies an existing file, OS-COPY overwrites the existing file.- If
target-filehas the same name assource-file, the copy fails, but OS-ERROR is not set.- If the copy terminates abnormally, Progress deletes the partial
target-file.- Enclose filenames that refer to physical devices in double quotes (" ").
- Although an error can occur during execution of this statement, the statement does not generate an error message, raise an error condition, or affect the program’s flow in any way. Check for an execution error by using the OS-ERROR function and evaluating the return.
See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |